<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title>插入教师信息</title>
	<link href="<%=basePath%>js/calendar/skins/aqua/theme.css" rel="stylesheet"/>
	<link href="<%=basePath%>js/validate/jquery.validate.css" rel="stylesheet"/>
	<script type="text/javascript" src="<%=basePath%>js/jquery-1.4.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/validate/jquery.validate.js"></script>
	<script type="text/javascript" charset="GBK" src="<%=basePath%>js/validate/messages_cn.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/calendar/calendar.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/calendar/calendar-setup.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/calendar/lang/calendar-zh_CN.js"></script>
	<script type="text/javascript">
	$(function(){

		$("#teacherForm").validate({
					rules:{
						"tea.teachName":{
							required:true,
							maxlength:50
						},
						"tea.address":{
							required:true,
							maxlength:255
						},
						"tea.tel":{
							required:true,
							maxlength:20,
							minlength:3,
							number:true
						},
						"tea.nation":{
							required:true,
							maxlength:10
						}
					}
				});
	}) ;
</script>
</head>

<body bgcolor="#D6E0EF" >
<div align="center">
<form id="teacherForm" method="post" action="basicInfo!insertTeacherInfo">
	<table align="center">
		<tr>
			<td>教师姓名：</td>
			<td align="left"><input type="text" name="tea.teachName" id="tea.teachName" value="" /></td>
		</tr>
		<tr>
			<td>入职时间：</td>
			<td align="left"><input type="text" name="tea.createDate" id="tea.createDate" value="" readonly="readonly"/></td>
			<td align="left"><img id="dateTime" src="<%=basePath%>js/calendar/skins/aqua/cal.gif" style="cursor: pointer;"/></td>
		</tr>
		
		<tr>
			<td align="left">性&nbsp;&nbsp;&nbsp;&nbsp;别:</td>
			<td align="left">女<input type="radio" name="tea.sex" value="女"/>男<input type="radio" name="tea.sex" value="男" checked="checked" /></td>
		</tr>
		<tr>
			<td>联系地址：</td>
			<td align="left"><input type="text" name="tea.address" id="tea.address" value="" /></td>
		</tr>
		<tr>
			<td>联系电话：</td>
			<td align="left"><input type="text" name="tea.tel" id="tea.tel" value="" /></td>
		</tr>
		<tr>
			<td>民族：</td>
			<td align="left"><input type="text" name="tea.nation" id="tea.nation" value="" /></td>
		</tr>
		<tr>
			<td></td>
			<td align="left"><input type="submit" name="button" id="button" value="插入数据" /></td>
		</tr>
	</table>
</form>
</div>
	<script type="text/javascript">
		Calendar.setup( {
			inputField : "tea.createDate",
			ifFormat : "%Y-%m-%d",
			showsTime : "true",
			button : "dateTime",
			step : 1
		});
	</script>
</body>
</html>
